<?php
FLEA::loadClass('FLEA_Db_TableDataGateway');

class Model_Product extends FLEA_Db_TableDataGateway
{
	var $tableName = 'product';
	var $primaryKey = 'id';

	/*var $manyToMany= array(
		'tableClass' => 'Model_Hospital',
		'joinTableClass' => 'Model_Price',
		'foreignKey' => 'productId',
		'assocForeignKey' => 'hospitalId',
		'mappingName' => 'price',
		);*/

	var $hasOne = array(
		array('tableClass' => 'Model_Cert',
			'foreignKey' => 'product_id',
			'mappingName' => 'cert',
		),
		array('tableClass' => 'Model_ProduceCompany',
			'foreignKey' => 'product_id',
			'mappingName' => 'p_company',
		),
	);
	
	/*var $hasMany = array(
		array(
			'tableClass' => 'Model_Hospital',
			'foreignKey' => 'product_id',
			'mappingName' => 'hospital',
		),
		array(
			'tableClass' => 'Model_Outland',
			'foreignKey' => 'product_id',
			'mappingName' => 'outland',
		),
	);*/
}
?>